#ifndef __INETADDRESS_H
#define __INETADDRESS_H
#include "header.h"
#include <string>
using std::string;
namespace moqi
{
using address_IPv4 = struct sockaddr_in;
class InetAddress
{
//using address_IPv6 = struct sockaddr_in6;
public:
    InetAddress(const string &port, const string &ip);
    InetAddress(const unsigned int &port, const string &ip);
    InetAddress(const address_IPv4 & rhs);
    ~InetAddress();
    string ip()const;//返回IP
    unsigned int port()const;//返回端口号
    const address_IPv4 * getInetAddress()const;//返回地址结构体

private:
    address_IPv4 _add;//ipv4地址
};
}


#endif

